package com.xuecheng.media.feignclient.auth;

import com.xuecheng.auth.model.po.Company;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value="auth-api",path="/auth",contextId="company",
    fallbackFactory=CompanyClientFactory.class)
@RequestMapping("/company")
public interface CompanyClient {
    @GetMapping("/{id}")
    public Company getById(@PathVariable("id") Long id);
}
